home *** CD-ROM | disk | FTP | other *** search
/ Light ROM 1 / LIGHT-ROM 1 (Amiga Library Services)(1994).iso / ffdisks / d899.lha / GoodDouble / good_double.h < prev    next >
C/C++ Source or Header  |  1993-07-05  |  2KB  |  72 lines

  1. /*
  2.  *  good_double.h
  3.  */
  4.  
  5. /*
  6.  *    you may comment this out to save c. 200 bytes, if not interested
  7.  *    in the MIDDLE button (just put /* at the start of the line)
  8.  */
  9. #define ALL_BUTTONS /* */
  10.  
  11. /*
  12.  *    we have registerized function arguments if this #define below is on;
  13.  *    have it commented out if you don't want registerized arguments
  14.  *    (e.g. if your compiler doesn't support these)
  15.  */
  16. /* #define GDC_REGARGS /* */
  17.  
  18.  
  19. #ifdef  ALL_BUTTONS
  20.     /*
  21.      *    our macros
  22.      */
  23.     #define LeftDouble(s,m)    GoodDouble(0,s,m)
  24.     #define MiddleDouble(s,m)  GoodDouble(1,s,m)
  25.     #define RightDouble(s,m)   GoodDouble(2,s,m)
  26.  
  27.     /*
  28.      *    function prototype
  29.      */
  30.     #ifndef GDC_REGARGS
  31.         BOOL GoodDouble( LONG, ULONG, ULONG );
  32.     #else
  33.         #ifdef _DCC                /* i.e. DICE */
  34.             __regargs BOOL GoodDouble( LONG, ULONG, ULONG );
  35.         #else
  36.             /*
  37.              *    typical non-DICE compiler wants it like that
  38.              */
  39.             BOOL GoodDouble( register LONG, register ULONG, register ULONG );
  40.         #endif
  41.     #endif
  42. #else
  43.     /*
  44.      *     if you are only interested in LEFT & RIGHT buttons, and
  45.      *     want this object to be slightly smaller, use these instead of
  46.      *     the ones above
  47.      */
  48.  
  49.      /*
  50.       *    our macros
  51.       */
  52.      #define LeftDouble(s,m)    GoodDouble2(0,s,m)
  53.      #define MiddleDouble(s,m)  GoodDouble2(1,s,m)   /* <--- dummy! */
  54.      #define RightDouble(s,m)   GoodDouble2(2,s,m)
  55.  
  56.      /*
  57.       *    function prototype
  58.       */
  59.     #ifndef GDC_REGARGS
  60.         BOOL GoodDouble2( LONG, ULONG, ULONG );
  61.     #else
  62.         #ifdef _DCC                /* i.e. DICE */
  63.             __regargs BOOL GoodDouble2( LONG, ULONG, ULONG );
  64.         #else
  65.             /*
  66.              *    typical non-DICE compiler wants it like that
  67.              */
  68.             BOOL GoodDouble2( register LONG, register ULONG, register ULONG );
  69.         #endif
  70.     #endif
  71. #endif
  72.